Open
Conversation
…CI/CD - OpenAI streaming chat endpoint with get_events and provide_links tools - Server actions for knowledge CRUD, reseed, import, usage metrics - Event filtering/formatting utilities with timezone-aware LA time handling - System prompt builder with profile-aware personalization and prefix caching - Vector search context retrieval with retry/backoff - Knowledge base JSON (55 entries: FAQ, tracks, judging, submission, general) - CI/CD seed scripts for hackbot_knowledge to hackbot_docs - Auth session extended with position, is_beginner, name fields - Tailwind hackbot-slide-in animation keyframe - Dependencies: ai@6, @ai-sdk/openai
Knowledge table with create/edit/delete, JSON import with preview, reseed button, and usage metrics dashboard. Context provider with optimistic updates. Admin page updated with hackbot nav link.
…o hackbot-admin-panel
…o hackbot-admin-panel
There was a problem hiding this comment.
Pull request overview
Adds an admin-facing HackBot management page under /admin/hackbot to manage knowledge documents (CRUD + import), run maintenance actions (reseed/clear), and view usage metrics. This builds on the HackBot server-side actions introduced in #441.
Changes:
- Add
/admin/hackbotpage with a context provider, table + modal CRUD UI, JSON import preview/confirm flow, and result banners. - Add usage metrics dashboard widget with period switching (24h/7d/30d).
- Update admin landing page nav and change HackBot streaming default OpenAI model.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| app/(pages)/admin/page.tsx | Adds nav link to the new HackBot admin page |
| app/(pages)/admin/hackbot/page.tsx | New HackBot Knowledge admin page composition |
| app/(pages)/admin/_hooks/useHackbotKnowledge.tsx | Hook to consume HackbotKnowledge context |
| app/(pages)/admin/_contexts/HackbotKnowledgeContext.tsx | Core state/actions for knowledge CRUD, import, reseed, clear |
| app/(pages)/admin/_constants/hackbotKnowledge.ts | Knowledge doc type constants, labels, colors, empty form |
| app/(pages)/admin/_components/Hackbot/KnowledgeToolbar.tsx | Toolbar actions (import/clear/reseed/add) + JSON parsing |
| app/(pages)/admin/_components/Hackbot/KnowledgeTable.tsx | Table view for docs with edit/delete actions |
| app/(pages)/admin/_components/Hackbot/KnowledgeLoadState.tsx | Loading/error gate for knowledge data |
| app/(pages)/admin/_components/Hackbot/KnowledgeImportPreview.tsx | Import preview + confirm/cancel UI |
| app/(pages)/admin/_components/Hackbot/KnowledgeDocModal.tsx | Create/edit modal form for a knowledge doc |
| app/(pages)/admin/_components/Hackbot/KnowledgeBanners.tsx | Success/error banners for operations |
| app/(pages)/admin/_components/Hackbot/HackbotUsageMetrics.tsx | Usage metrics dashboard UI |
| app/(api)/_utils/hackbot/stream/model.ts | Updates default model string for streaming |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add HackBot admin panel for knowledge CRUD, import, and usage metrics
MERGE ONLY AFTER #441 IS MERGED
Closes #442